package cn.wyl.feignclient;


import cn.wyl.domain.Course;
import cn.wyl.feignclient.fallback.UserFeignClientFactory;
import cn.wyl.util.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "course-server",fallbackFactory = UserFeignClientFactory.class)
public interface BuyFeignClient {

    @PostMapping("/course/upd")
    public AjaxResult upd(@RequestBody Course course);

    @GetMapping("/course/{id}")
    public AjaxResult findById(@PathVariable("id") Long id);
}
